"use strict";
cc._RF.push(module, 'e9c26MbrEREOL+JJ3HC9lLK', 'AnimationAutoPlay');
// script/original/Standar/Utils/AnimationAutoPlay.js

"use strict";

cc.Class({
  "extends": cc.Component,
  properties: {
    autoplay: true,
    anim: cc.Animation
  },
  onLoad: function onLoad() {
    this.anim = this.node.getComponent(cc.Animation);
  },
  onEnable: function onEnable() {
    if (this.autoplay) {
      this.anim.resume();
      this.anim.play();
    }
  },
  playAnimation: function playAnimation() {
    this.anim.play();
  },
  playAnimationByName: function playAnimationByName(button, name) {
    this.anim.play(name);
  }
});

cc._RF.pop();